#include <iostream>

using namespace std;

class Clock{
public:
    Clock(int h,int m,int s):hour(h),minute(m),second(s),lable(0)
    {
        if((hour>23)||(minute>59)||(second>59))
        {
            cout<<"a wrong time"<<endl;
            lable=1;        
        }
    }
    void showtime()
    {
        if(lable==0)
        {
        cout<<hour<<":"<<minute<<":"<<second<<endl;
        }
    }

private:
    int hour;
    int minute;
    int second;
    int lable;
};

int main()
{
    int h,m,s;
    cin>>h>>m>>s;
    Clock a(h,m,s);
    a.showtime();

    system("pause");
    return 0;
}
